home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / iv26_w30.zip / EXAMPLES / IFB / MAIN.C < prev    next >
C/C++ Source or Header  |  1992-03-11  |  1KB  |  47 lines

  1.  
  2. #include <InterViews/button.h>
  3. #include <InterViews/world.h>
  4. #include <stdio.h>
  5. #include "fbrowser.h"
  6.  
  7. static PropertyData properties[] = {
  8.     { "ifb*sample", "The quick brown fox..." },
  9.     { "ifb*choice*font",
  10.         "*-*-times-medium-r-normal-*-*-120-*-*-*-*-iso8859-1"
  11.     },
  12.     { "ifb*label*font",
  13.         "*-*-times-bold-r-normal-*-*-120-*-*-*-*-iso8859-1"
  14.     },
  15.     { "ifb*PushButton*font",
  16.         "*-*-times-medium-i-normal-*-*-140-*-*-*-*-iso8859-1"
  17.     },
  18.     { nil }
  19. };
  20.  
  21. static OptionDesc options[] = {
  22.     { "-sample", "ifb*sample", OptionValueNext },
  23.     { nil }
  24. };
  25.  
  26. int IVMain (int argc, char** argv) {
  27.     World* world = new World("ifb", properties, options, argc, argv);
  28.     ButtonState* quit = new ButtonState((int)false);
  29.     FontBrowser* browser = new FontBrowser(
  30.         quit, world->GetAttribute("sample")
  31.     );
  32.  
  33.     browser->SetName("InterViews font browser");
  34.     browser->SetIconName("ifb");
  35.  
  36.     world->InsertApplication(browser);
  37.     browser->Accept();
  38.     world->Remove(browser);
  39.  
  40. //    puts(browser->Fontname());
  41.  
  42.     delete browser;
  43.     Unref(quit);
  44.     delete world;
  45.     return 0;
  46. }
  47.